<template>
    <div>
        <h3>小三组件</h3>
        <div>金钱：{{ $store.state.money }}</div>
        <!-- <button @click="add">买包:-100</button> -->
        <button @click="addFn">买车-1000</button>
        <button @click="addTt(1000)">做头发-1000</button>

    </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
    methods: {
        addFn() {
            this.$store.commit('addfn', {
                aa: 100,
                bb: 1000
            })
        },
        ...mapActions(['addTt'])
    }
}
</script>

<style>

</style>
